<template>
  <div class="resume g-wrap">
    <mt-header fixed title="中期考核信息">
      <router-link to="/" slot="left">
        <mt-button icon="back">返回</mt-button>
      </router-link>
    </mt-header>
    <!-- <div class="mainTitle">中期考核信息</div> -->
    <div v-if="!!infoData" class="infoBox">
      <mt-cell title="姓名" :value="infoData.xm"></mt-cell>
      <mt-cell title="学号" :value="infoData.xh"></mt-cell>
      <mt-cell title="学生类别" :value="infoData.xslbmc"></mt-cell>
      <mt-cell title="院系" :value="infoData.dwmc"></mt-cell>
      <mt-cell title="专业" :value="infoData.zymc"></mt-cell>
      <mt-cell title="研究方向" :value="infoData.pyfx || '--'"></mt-cell>
      <mt-cell title="导师姓名" :value="infoData.dsxm"></mt-cell>
    </div>
    <div>
      <div v-if="!zqkhData && isLoading === 0" class="noData">未创建</div>
      <div v-if="zqkhData">
        <div class="line"></div>
        <div class="infoDetail">
          <div class="title">一、思想品德、行为表现、综合素质</div>
          <div class="con" v-if="zqkhData.grpzzj" v-html="zqkhData.grpzzj"></div>
          <div class="con" v-if="!zqkhData.grpzzj">--</div>
        </div>
        <div class="infoDetail">
          <div class="title">二、参加科研项目、学术会议及发表论文情况</div>
          <div class="con" v-if="zqkhData.kyqkzj" v-html="zqkhData.kyqkzj"></div>
          <div class="con" v-if="!zqkhData.kyqkzj">--</div>
        </div>
        <div class="infoDetail">
          <div class="title">三、奖惩情况</div>
          <div class="con" v-if="zqkhData.jlqk" v-html="zqkhData.jlqk"></div>
          <div class="con" v-if="!zqkhData.jlqk">--</div>
        </div>
        <div class="infoDetail">
          <div class="title">四、身心状况</div>
          <div class="con" v-if="zqkhData.sxzk" v-html="zqkhData.sxzk"></div>
          <div class="con" v-if="!zqkhData.sxzk">--</div>
        </div>
        <div class="infoDetail">
          <div class="title">导师审核结果</div>
          <div class="con">审核结果：{{ zqkhData.zqkhztmc || '--' }}</div>
          <div class="con">导师审核意见：{{ zqkhData.zqkhztmc || '--' }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import request from '@/utils/request'
import { zqkhxxInfo, ktbgInfo } from '@/api'
import { Indicator } from 'mint-ui'

export default {
  name: 'resume',
  data() {
    return {
      isLoading: 1,
      infoData: '',
      zqkhData: ''
    }
  },
  methods: {
    getStudentClientInfo() {
      Indicator.open()
      request
        .get(ktbgInfo, {})
        .then((res) => {
          Indicator.close()
          const r = res.data
          this.getStudentClientQkhxxInfo()
          if (r && r.data) {
            this.infoData = r.data || {}
          }
        })
        .catch((err) => {})
    },
    getStudentClientQkhxxInfo() {
      Indicator.open()
      request
        .get(zqkhxxInfo, {})
        .then((res) => {
          Indicator.close()
          this.isLoading = 0
          const r = res.data
          if (r && r.data) {
            this.zqkhData = r.data || {}
          }
        })
        .catch((err) => {})
    }
  },
  mounted() {
    this.getStudentClientInfo()
  }
}
</script>

<style scoped lang="less">
@import url('../../../assets/styles/base.less');
.resume {
  padding-bottom: (50 / @base);
  // padding-top: (20 / @base);
  .infoBox {
    margin-top: (20 / @base);
  }
  .link {
    margin-left: (30 / @base);
  }
  .infoTable {
    padding-bottom: (15 / @base);
    padding-right: (15 / @base);
    table {
      width: 100%;
    }
    th,
    td {
      font-size: (24 / @base);
      color: #666;
      font-weight: normal;
      width: 25%;
      text-align: center;
      border: 1px solid #d9d9d9;
    }
    th {
      color: #999;
    }
  }
  .infoDetail {
    margin: (30 / @base) (20 / @base);
    .title {
      margin-bottom: (15 / @base);
    }
    .con {
      color: #888;
      line-height: (42 / @base);
    }
  }
  .noData {
    margin-top: (30 / @base);
    padding-bottom: (30 / @base);
  }
}
</style>
